package bbkj.org.cn.imple;

import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

import bbkj.org.cn.modle.DemoData;
import bbkj.org.cn.service.ClusterDemoService;
import bbkj.org.cn.util.DemoUtil;
import lombok.extern.slf4j.Slf4j;

@Service("clusterDemo")
@DubboService
@Slf4j
public class ClusterDemoImple implements ClusterDemoService{

	private final int min = 10;
	private final int max = 20;
	
	@Override
	public DemoData handleData(DemoData data) {
		log.info("demoData.name={},num={}",data.getName(),data.getNum());
		
		DemoUtil.handleData(data, min, max);
		
		log.info("处理{}后：num={}",data.getName(),data.getNum());
		return data;
	}

}
